﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucListProductByCate.ascx.cs" Inherits="TTMarketing.UserControl.SanPham.ucListProductByCate" %>
<asp:ObjectDataSource ID="osdCate" runat="server" SelectMethod="Category_getAllCate" 
    TypeName="TTController.clsController">
    <SelectParameters>
        <asp:Parameter DefaultValue="true" Name="visible" Type="Boolean" />
        <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:DataList ID="dlProductByCate" runat="server" DataSourceID="osdCate" 
    Width="239px">
    <ItemTemplate>
         <div id="com-main-left-title">
        <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' /></div>
         <br />
        <div id="com-main-left-box">
        <asp:DataList ID="dlProductInCate" runat="server" DataSourceID="odsProductByCate" 
                RepeatColumns="3">
            
            <ItemTemplate><div id="com-main-left-box-item">
                <div id="com-main-left-box-item-img">
                <asp:Image ID="Image1" runat="server" 
                    ImageUrl='<%# "~/Image/Upload/"+Eval("Image") %>' 
                        AlternateText='<%# Eval("Name") %>' />
                <div id="com-main-left-box-item-content-button-readmore">
                <asp:HyperLink ID="hlDetail" runat="server" 
                    NavigateUrl='<%# "~/san-pham.aspx?id="+Eval("ID") %>'>Xem chi tiết</asp:HyperLink>
                    </div>
                <br />
                <asp:HiddenField ID="hfProductID" runat="server" Value='<%# Eval("ID") %>' /></div>
                <br />
                <br />
                <br /></div>
            </ItemTemplate>
            
        </asp:DataList>
        </div>
        <asp:ObjectDataSource ID="odsProductByCate" runat="server" 
            SelectMethod="Product_getTopProductByCate" 
             TypeName="TTController.clsController">
            <SelectParameters>
                <asp:ControlParameter ControlID="hfCateID" Name="cateID" PropertyName="Value" 
                    Type="Int32" />
                <asp:Parameter DefaultValue="3" Name="top" Type="Int32" />
                <asp:Parameter DefaultValue="true" Name="visible" Type="Boolean" />
                <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:HiddenField ID="hfCateID" runat="server" Value='<%# Eval("ID") %>' />
        <br />
        <br />
        <br />
        <br />
    </ItemTemplate>
</asp:DataList>

